#include <iostream>
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>

void handler(int signo)
{
    std::cout << "-------------------------------------" << std::endl;
    std::cout << "signo: " << signo << " pid:" << getpid() << std::endl;
    std::cout << "-------------------------------------" << std::endl;
}
int main()
{
    signal(2, handler);
    return 0;
}